/**
 * 引入:
 * 1. express
 * 2. cookie-parser
 * 3. cookie-session
 */
const express = require("express");
const config = require("./config");
const routerApp = require("./routerApp");
/*-------------------- 静态变量定义区-开始 --------------------*/
const PORT = 8080;  // 监听端口

/*-------------------- 静态变量定义区-结束 --------------------*/

/**
 * 框架插件引用区
 */
let app = express();
app = config(app);
app.use(express.static("public"));  // 静态资源目录
routerApp(app);

/**
 * 监听8080端口
 */
app.listen(PORT, () => {
    console.log("listening server on port: " + PORT);
});